using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._NetworkDataset
{
    /// <summary>
    /// <para>Dissolve Network</para>
    /// <para>Creates a network dataset that minimizes the number of line features required to correctly model the input network dataset. The more efficient output network dataset reduces the time required to solve analyses, draw results, and generate driving directions. This tool outputs a new network dataset and source feature classes; the input network dataset and its source features remain unchanged.</para>
    /// <para>创建一个网络数据集，以最小化正确建模输入网络数据集所需的线要素数量。更高效的输出网络数据集减少了求解分析、绘制结果和生成行驶方向所需的时间。此工具将输出新的网络数据集和源要素类;输入网络数据集及其源要素保持不变。</para>
    /// </summary>    
    [DisplayName("Dissolve Network")]
    public class DissolveNetwork : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DissolveNetwork()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_dataset">
        /// <para>Input Network Dataset</para>
        /// <para><xdoc>
        ///   <para>The network dataset to be dissolved.</para>
        ///   <para>The input network dataset must be a file or personal geodatabase network dataset with exactly one edge source. Any number of junction sources and turn sources is allowed. The edge source must have:
        ///   <bulletList>
        ///     <bullet_item>End point connectivity policy  </bullet_item><para/>
        ///     <bullet_item>An elevation policy of either None or Elevation Fields  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>The input network dataset must be built before it can be used in this tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要解散的网络数据集。</para>
        /// <para>输入网络数据集必须是仅具有一个边源的文件或个人地理数据库网络数据集。允许任意数量的交汇点源和转弯源。边缘源必须具有：
        ///   <bulletList>
        ///     <bullet_item>端点连接策略</bullet_item><para/>
        ///     <bullet_item>“无”或“高程字段”的提升策略</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>必须先构建输入网络数据集，然后才能在此工具中使用。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_workspace_location">
        /// <para>Output Geodatabase Workspace</para>
        /// <para>The geodatabase workspace in which to create the dissolved network dataset. The workspace must be an ArcGIS 10 geodatabase or later, and it must be a different geodatabase than the one where the input network dataset resides.</para>
        /// <para>用于创建融合网络数据集的地理数据库工作空间。工作空间必须是 ArcGIS 10 或更高版本的地理数据库，并且其地理数据库必须与输入网络数据集所在的地理数据库不同。</para>
        /// </param>
        public DissolveNetwork(object _in_network_dataset, object _out_workspace_location)
        {
            this._in_network_dataset = _in_network_dataset;
            this._out_workspace_location = _out_workspace_location;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Dissolve Network";

        public override string CallName => "na.DissolveNetwork";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_network_dataset, _out_workspace_location, _out_network_dataset];

        /// <summary>
        /// <para>Input Network Dataset</para>
        /// <para><xdoc>
        ///   <para>The network dataset to be dissolved.</para>
        ///   <para>The input network dataset must be a file or personal geodatabase network dataset with exactly one edge source. Any number of junction sources and turn sources is allowed. The edge source must have:
        ///   <bulletList>
        ///     <bullet_item>End point connectivity policy  </bullet_item><para/>
        ///     <bullet_item>An elevation policy of either None or Elevation Fields  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>The input network dataset must be built before it can be used in this tool.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要解散的网络数据集。</para>
        /// <para>输入网络数据集必须是仅具有一个边源的文件或个人地理数据库网络数据集。允许任意数量的交汇点源和转弯源。边缘源必须具有：
        ///   <bulletList>
        ///     <bullet_item>端点连接策略</bullet_item><para/>
        ///     <bullet_item>“无”或“高程字段”的提升策略</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>必须先构建输入网络数据集，然后才能在此工具中使用。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_dataset { get; set; }


        /// <summary>
        /// <para>Output Geodatabase Workspace</para>
        /// <para>The geodatabase workspace in which to create the dissolved network dataset. The workspace must be an ArcGIS 10 geodatabase or later, and it must be a different geodatabase than the one where the input network dataset resides.</para>
        /// <para>用于创建融合网络数据集的地理数据库工作空间。工作空间必须是 ArcGIS 10 或更高版本的地理数据库，并且其地理数据库必须与输入网络数据集所在的地理数据库不同。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Geodatabase Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_workspace_location { get; set; }


        /// <summary>
        /// <para>Output Dissolved Network Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Dissolved Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_network_dataset { get; set; }


        public DissolveNetwork SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}